package com.menghanjun.mhjresourcesharing.service;

import com.menghanjun.mhjresourcesharing.entity.TResources;
import com.baomidou.mybatisplus.extension.service.IService;
import com.menghanjun.mhjresourcesharing.vo.TResourcesVo;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author menghanjun
 * @since 2024-04-19
 */
public interface ITResourcesService extends IService<TResources> {

    List<TResourcesVo> getResourcesList(String type,String title,String resourceId,String level,int pageNo, int pageSize,String order,String queryFlag);


    int getResourcesListTotal(String type,String title,String resourceId,String level,String queryFlag);


    String getResourceUrlById(String id);

    TResources getResourceById(String resourceId);

    TResourcesVo getResourceVoById(String resourceId);

    void updateResource(TResources resources);

    void thoroughDeleteResourceById(String resourceId);

    String uploadResourceImage(MultipartFile file, String resourceId);

    boolean isResourceExist(String resourceId);

    void deleteResourceById(String resourceId);

    List<Map<String,Object>> initMainPage(String order);

    /**
     * 增加一次点击量
     * @param resourceId
     */
    void addClikCount(String resourceId);
}
